Skip to main content

SWC API Controller Endpoint Refactor

Please make note of the following:

  • URLs are NOT case sensitive.
  • Parameters can be in any order.

EvaporationController

Old: /evaporation

New: /api/evaporation/stationdata?stationName=X

EvaporationStationAndDataController

Old: /EvaporationStationAndData?pLatitude=X&pLongitude=Y

New: /api/EvaporationStationData/LocationData?latitude=X&longitude=Y

GeoCoderController

Old: /GeoCoder?location=X

New: /api/GeoCoder/Coordinates?location=X

HourlyRainfallController

Old: /HourlyRainfall/GetHourlyRainfall?year=X&pStation=Y

New: /api/Rainfall/Hourly?year=X&pStation=Y


Old: /HourlyRainfall/getRainfallDatFile?year=X&pStation=Y

New: /api/Rainfall/DatFile?year=X&pStation=Y

RainfallStationsController

Old: /RainfallStations?pLatitude=X&pLongitude=Y

New: /api/RainfallStations/NearbyStations?pLatitude=X&pLongitude=Y

RecentSitesController

Old: /RecentSites/GetSiteName?LoginID=X

New: /api/RecentSites/SiteName?LoginID=X


Old: /RecentSites/GetRecentScenario?LoginID=X&SiteName=Y

New: /api/RecentSites/RecentScenario?LoginID=X&SiteName=Y

RunController

Note that RunController only has a POST method, no GETs. Related, all data is sent in the request body, not via parameters.

Old: /Run

New: /api/Runs/New

SimulationResultsController

Note that the Results and Poll endpoints appear to have the exact same functionality. We should review this to make sure that's the case and fix any related issues.

Old: /SimulationResults/results?LoginID=X&SiteName=Y

New: /api/SimulationResults/results?LoginID=X&SiteName=Y


Old: /SimulationResults/poll?LoginID=X&SiteName=Y

New: /api/SimulationResults/poll?LoginID=X&SiteName=Y


Old: /SimulationResults/downloadinp?LoginID=X&SiteName=Y

New: /api/SimulationResults/InpFile?LoginID=X&SiteName=Y

SoilDataController

Old: /SoilData?pLatitude=X&pLongitude=Y

New: /api/SoilData/AllData?pLatitude=X&pLongitude=Y

I chose AllData here to allow for future expansion into pulling only certain layers, i.e., Composition, Drainage, Elevation, etc.